#-------------------------------------------------
#
# Project created by QtCreator 2021-09-25T10:49:02
#
#-------------------------------------------------

QT       += core gui sql serialport printsupport dbus charts

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets


TARGET = EttaM1
TEMPLATE = app

include($$PWD/core_input2019/core_input2019.pri)
include($$PWD/singleapplication/singleapplication.pri)
DEFINES += QAPPLICATION_CLASS=QApplication

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

CONFIG += c++11
CONFIG *= force_debug_info

SOURCES += \
    authmanager.cpp \
    chartpreview.cpp \
    chartutils.cpp \
    checker/diskchecker.cpp \
    checker/materialchecker.cpp \
    checker/paramchecker.cpp \
    checker/samplechecker.cpp \
    config/filepathmanager.cpp \
    config/presetobject.cpp \
    config/presetserver.cpp \
    config/systempreset.cpp \
    config/vdsconfig.cpp \
    controls/customlineedit.cpp \
    controls/customnumedit.cpp \
    customprinter.cpp \
    database/databasemanager.cpp \
    datetimepicker.cpp \
    errordef.cpp \
    factory.cpp \
    flowtestresult.cpp \
    loading.cpp \
    main.cpp \
    mainwindow.cpp \
    measure/flowmeasure.cpp \
    measure/voltagemeasure.cpp \
    motorcalibdialog.cpp \
    passwordmodify.cpp \
    poweroffloading.cpp \
    report.cpp \
    service/buzzer.cpp \
    service/pdfloader.cpp \
    service/udiskexport.cpp \
    service/udiskupgrade.cpp \
    shadow.cpp \
    startup.cpp \
    login.cpp \
    devchecker.cpp \
    mainui.cpp \
    currtime.cpp \
    currver.cpp \
    sampleinfo.cpp \
    data.cpp \
    experiment.cpp \
    expfail.cpp \
    exppass.cpp \
    samplebrief.cpp \
    blldataflow.cpp \
    project.cpp \
    returnmain.cpp \
    config.cpp \
    userlogger.cpp \
    userstatus.cpp \
    configdetail.cpp \
    localinfo.cpp \
    helpinfo.cpp \
    performance.cpp \
    paramset.cpp \
    timeset.cpp \
    ipconfig.cpp \
    sysupdate.cpp \
    logdetail.cpp \
    usermanage.cpp \
    printtemplate.cpp \
    mfrconfig.cpp \
    logo.cpp \
    sqlhelper.cpp \
    globaldef.cpp \
    about.cpp \
    systemconfig.cpp \
    useradd.cpp \
    rolemodify.cpp \
    roleadd.cpp \
    commonfunction.cpp \
    utilities/audiomanager.cpp \
    utilities/clockmanager.cpp \
    utilities/diskmanager.cpp \
    utilities/networkmanager.cpp \
    utilities/powermanager.cpp \
    utilities/qterminal.cpp \
    utilities/screenmanager.cpp \
    utilities/udisk.cpp \
    utilities/udiskmanager.cpp \
    vds/bllchartreader.cpp \
    vds/chartreader.cpp \
    vds/controlcenter.cpp \
    vds/datacenter.cpp \
    vds/fileworker.cpp \
    vds/measureworker.cpp \
    vds/paintworker.cpp \
    vds/vds-measure/measure.c \
    vds/vds-measure/measure_arithmetic.c \
    vds/vds-measure/measure_dataParse.c \
    vds/vds-wrap/vdsadapter.cpp \
    vds/vds-wrap/vdsdevice.cpp \
    versionchoose.cpp \
    versiondialog.cpp \
    viewlogsdialog.cpp \
    volttestresult.cpp \
    roledelete.cpp \
    usermodifyrole.cpp \
    userresetpw.cpp \
    userdelete.cpp \
    paramadd.cpp \
    paramdelete.cpp \
    parammodify.cpp \
    poweroff.cpp \
    appinit.cpp \
    labelbutton.cpp \
    itemdelegate.cpp \
    multirowheadertable.cpp \
    bllcontroller.cpp \
    controller.cpp \
    log4z.cpp \
    selfcheckfail.cpp \
    zbase64.cpp \
    testloading.cpp \
    printtemplatepreview.cpp \
    myoffice.cpp \
    msgbox.cpp \
    ipaddress.cpp

HEADERS += \
    authmanager.h \
    chartpreview.h \
    chartutils.h \
    checker/diskchecker.h \
    checker/materialchecker.h \
    checker/paramchecker.h \
    checker/samplechecker.h \
    config/enumpresetitem.h \
    config/filepathmanager.h \
    config/presetobject.h \
    config/presetserver.h \
    config/systempreset.h \
    config/vdsconfig.h \
    controls/customlineedit.h \
    controls/customnumedit.h \
    customprinter.h \
    database/databasemanager.h \
    datetimepicker.h \
    errorcode_p.h \
    errordef.h \
    factory.h \
    flowtestresult.h \
    loading.h \
    mainwindow.h \
    measure/flowmeasure.h \
    measure/imeasure.h \
    measure/voltagemeasure.h \
    motorcalibdialog.h \
    passwordmodify.h \
    poweroffloading.h \
    report.h \
    service/buzzer.h \
    service/idataexport.h \
    service/iexportable.h \
    service/iupgrade.h \
    service/pdfloader.h \
    service/udiskexport.h \
    service/udiskupgrade.h \
    shadow.h \
    startup.h \
    login.h \
    devchecker.h \
    mainui.h \
    currtime.h \
    currver.h \
    sampleinfo.h \
    data.h \
    experiment.h \
    expfail.h \
    exppass.h \
    samplebrief.h \
    blldataflow.h \
    project.h \
    returnmain.h \
    config.h \
    translation.h \
    userlogger.h \
    userstatus.h \
    configdetail.h \
    localinfo.h \
    helpinfo.h \
    performance.h \
    paramset.h \
    timeset.h \
    ipconfig.h \
    sysupdate.h \
    logdetail.h \
    usermanage.h \
    printtemplate.h \
    mfrconfig.h \
    logo.h \
    constants.h \
    sqlhelper.h \
    ettadatastruct.h \
    globaldef.h \
    about.h \
    systemconfig.h \
    useradd.h \
    rolemodify.h \
    roleadd.h \
    commonfunction.h \
    utilities/audiomanager.h \
    utilities/clockmanager.h \
    utilities/diskmanager.h \
    utilities/networkmanager.h \
    utilities/powermanager.h \
    utilities/qterminal.h \
    utilities/screenmanager.h \
    utilities/udisk.h \
    utilities/udiskmanager.h \
    vds/bllchartreader.h \
    vds/chartreader.h \
    vds/common.h \
    vds/controlcenter.h \
    vds/datacenter.h \
    vds/fileworker.h \
    vds/ivdsmeasure.h \
    vds/ivdspaint.h \
    vds/measureworker.h \
    vds/paintworker.h \
    version.h \
    versionchoose.h \
    versiondialog.h \
    viewlogsdialog.h \
    volttestresult.h \
    roledelete.h \
    usermodifyrole.h \
    userresetpw.h \
    userdelete.h \
    paramadd.h \
    paramdelete.h \
    parammodify.h \
    poweroff.h \
    appinit.h \
    labelbutton.h \
    itemdelegate.h \
    multirowheadertable.h \
    bllcontroller.h \
    controller.h \
    log4z.h \
    selfcheckfail.h \
    zbase64.h \
    testloading.h \
    printtemplatepreview.h \
    myoffice.h \
    msgbox.h \
    ipaddress.h


FORMS += \
    chartpreview.ui \
    controls/customnumedit.ui \
    customprinter.ui \
    datetimepicker.ui \
    factory.ui \
    flowtestresult.ui \
    loading.ui \
    mainwindow.ui \
    motorcalibdialog.ui \
    passwordmodify.ui \
    poweroffloading.ui \
    report.ui \
    startup.ui \
    login.ui \
    mainui.ui \
    currtime.ui \
    currver.ui \
    sampleinfo.ui \
    data.ui \
    experiment.ui \
    expfail.ui \
    exppass.ui \
    samplebrief.ui \
    project.ui \
    returnmain.ui \
    config.ui \
    userstatus.ui \
    configdetail.ui \
    localinfo.ui \
    helpinfo.ui \
    performance.ui \
    paramset.ui \
    timeset.ui \
    ipconfig.ui \
    sysupdate.ui \
    logdetail.ui \
    usermanage.ui \
    printtemplate.ui \
    mfrconfig.ui \
    logo.ui \
    about.ui \
    systemconfig.ui \
    useradd.ui \
    rolemodify.ui \
    roleadd.ui \
    versionchoose.ui \
    versiondialog.ui \
    viewlogsdialog.ui \
    volttestresult.ui \
    roledelete.ui \
    usermodifyrole.ui \
    userresetpw.ui \
    userdelete.ui \
    paramadd.ui \
    paramdelete.ui \
    parammodify.ui \
    poweroff.ui \
    selfcheckfail.ui \
    testloading.ui \
    printtemplatepreview.ui \
    msgbox.ui \
    ipaddress.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

TRANSLATIONS += language/etta_cn.ts \
                language/etta_en.ts

RESOURCES += \
    res.qrc

RC_ICONS = "install/resources/images/etta-m1.ico"

unix {
    LIBS += $$relative_path($$PWD, $$OUT_PWD)/qrcode/unix/libqrcode.a
    LIBS += $$relative_path($$PWD, $$OUT_PWD)/poppler/unix/libpoppler-qt5.so.1

    QMAKE_RPATHDIR += :\'\$$ORIGIN/../etta-m1/poppler/unix\':\'\$$ORIGIN/../poppler/unix\'
}

win32 {
    DEFINES *= Q_COMPILER_INITIALIZER_LISTS
    contains(QT_ARCH, i386) {
        LIBS += $$relative_path($$PWD, $$OUT_PWD)/vds/vds-wrap/Lib_x86/visa32.lib
    } else {
        LIBS += $$relative_path($$PWD, $$OUT_PWD)/vds/vds-wrap/Lib_x64/visa64.lib
    }

    win32-g++: LIBS += $$relative_path($$PWD, $$OUT_PWD)/qrcode/win32/libqrcode.a
    else:      LIBS += $$relative_path($$PWD, $$OUT_PWD)/qrcode/win32/qrcode.lib

    LIBS += -L$$relative_path($$PWD, $$OUT_PWD)/poppler/win32 -llibpoppler-qt5
}

INCLUDEPATH += \
    vds \
    vds/vds-measure \
    vds/vds-wrap \
    vds/vds-wrap/Include \
    qrcode \
    qrcode/include \
    utilities \
    service \
    checker \
    poppler/include \
    measure \
    config \
    controls \
    database

DISTFILES += \
    language/etta_cn.ts \
    language/etta_en.ts
